package com.xcity.pomelo.response;

import com.xcity.game.skill.template.SkillLevelUpTemplate;
import com.xcity.game.skill.v2.DefaultSkillV2;

public class SkillV2Info {

	private DefaultSkillV2 refer;
	
	public SkillV2Info(DefaultSkillV2 refer) {
		this.refer = refer;
	}
	
	public int getId() {
		return refer.getId();
	}
	
	public String getName() {
		return refer.getName();
	}
	
	public String getIcon() {
		return refer.getIcon();
	}
	
	/**
	 * 模板描述，需要配合params转换一下<br/>
	 * MessageFormat.format(desc, params)
	 * @return
	 */
	public String getDesc() {
		return refer.getTemplate().getDesc();
	}
	
	public byte getUnlocked() {
		return refer.getUnlocked();
	}
	
	public int getUnlockStarLvl() {
		return refer.getUnlockStarLvl();
	}
	
	public Object[] getParams() {
		return refer.getParams();
	}
	
	public int getLevel() {
		return refer.getLevel();
	}
	
	public int getMaxLevel() {
		return refer.getTemplate().getMaxLevel();
	}
	
	/**
	 * 升级消耗现金
	 * @return -1: 已升到顶级
	 */
	public int getGold() {
		SkillLevelUpTemplate slut = refer.getTemplate().getUpLvlTemplate(refer.getLevel() + 1);
		return slut != null ? slut.getGold() : -1;
	}
	
	public int getPoints() {
		SkillLevelUpTemplate slut = refer.getTemplate().getUpLvlTemplate(refer.getLevel() + 1);
		return slut != null ? slut.getPoints() : -1;
	}
	
}
